Skip to content

Conversation

matthewjasper
Copy link
Contributor

Borrow check can tell whether a pattern is exhaustive or not, make sure that non_exhaustive prevents this.

@matthewjasper matthewjasper added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Nov 24, 2019
@rust-highfive
Copy link
Contributor

r? @varkor

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 24, 2019
@Centril Centril added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. F-non_exhaustive `#![feature(non_exhaustive)]` labels Nov 25, 2019
@varkor
Copy link
Member

varkor commented Nov 27, 2019

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 27, 2019

📌 Commit 294f7e4 has been approved by varkor

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 27, 2019
tmandry added a commit to tmandry/rust that referenced this pull request Nov 27, 2019
…ck, r=varkor

Handle non_exhaustive in borrow checking

Borrow check can tell whether a pattern is exhaustive or not, make sure that `non_exhaustive` prevents this.
bors added a commit that referenced this pull request Nov 27, 2019
Rollup of 17 pull requests

Successful merges:

 - #64325 (Stabilize nested self receivers in 1.41.0)
 - #66222 (Use `eq_opaque_type_and_type` when type-checking closure signatures)
 - #66305 (Add by-value arrays to `improper_ctypes` lint)
 - #66399 (rustc_metadata: simplify the interactions between Lazy and Table.)
 - #66534 (Allow global references via ForeignItem and Item for the same symbol name during LLVM codegen)
 - #66700 (Fix pointing at arg for fulfillment errors in function calls)
 - #66704 (Intra doc enum variant field)
 - #66718 (Refactor `parse_enum_item` to use `parse_delim_comma_seq`)
 - #66722 (Handle non_exhaustive in borrow checking)
 - #66744 (Fix shrink_to panic documentation)
 - #66761 (Use LLVMDisposePassManager instead of raw delete in rustllvm)
 - #66769 (Add core::{f32,f64}::consts::TAU.)
 - #66774 (Clean up error codes)
 - #66777 (Put back tidy check on error codes)
 - #66797 (Fixes small typo in array docs r? @steveklabnik)
 - #66798 (Fix spelling typos)
 - #66800 (Combine similar tests for const match)

Failed merges:

r? @ghost
@bors bors merged commit 294f7e4 into rust-lang:master Nov 28, 2019
@matthewjasper matthewjasper deleted the non_exhaustive_borrowck branch November 28, 2019 06:52
@pnkfelix
Copy link
Member

beta-accepted

@pnkfelix
Copy link
Member

(Just to provide some more context here, since no bug was filed about this: the #[non_exhaustive] attribute was stabilized in PR #64639, which is part of the current beta channel but not stable. So the reason to beta-backport this is to prevent people from writing code that depends on the bug during the initial deployment of its stable form.)

@pnkfelix pnkfelix added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Dec 5, 2019
@pnkfelix
Copy link
Member

pnkfelix commented Dec 5, 2019

sorry, I forgot to add the tag last week

@Mark-Simulacrum Mark-Simulacrum removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Dec 5, 2019
bors added a commit that referenced this pull request Dec 7, 2019
[beta] backports

This pull request backports the following pull requests, which have all been beta-accepted by the
compiler team.

 * Handle non_exhaustive in borrow checking #66722
 * Do not ICE on trait aliases with missing obligations #66392
 * Do not ICE in `if` without `else` in `async fn` #66391
 * Fix ICE when trying to suggest `Type<>` instead of `Type()` #66390
 * Do not ICE on recovery from unmet associated type bound obligation #66388
 * find_deprecation: deprecation attr may be ill-formed meta. #66381
 * parser: don't use `unreachable!()` in `fn unexpected`. #66361
 * Undo an assert causing an ICE until we fix the underlying problem #66250
 * Do not ICE with a precision flag in formatting str and no format arguments #66093
 * Fix two OOM issues related to `ConstProp` #66394
bors added a commit that referenced this pull request Dec 8, 2019
[beta] backports

This pull request backports the following pull requests, which have all been beta-accepted by the
compiler team.

 * Handle non_exhaustive in borrow checking #66722
 * Do not ICE on trait aliases with missing obligations #66392
 * Do not ICE in `if` without `else` in `async fn` #66391
 * Fix ICE when trying to suggest `Type<>` instead of `Type()` #66390
 * Do not ICE on recovery from unmet associated type bound obligation #66388
 * find_deprecation: deprecation attr may be ill-formed meta. #66381
 * parser: don't use `unreachable!()` in `fn unexpected`. #66361
 * Undo an assert causing an ICE until we fix the underlying problem #66250
 * Do not ICE with a precision flag in formatting str and no format arguments #66093
 * Fix two OOM issues related to `ConstProp` #66394
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. F-non_exhaustive `#![feature(non_exhaustive)]` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants